package com.ddw.meedeeuh.shared.movie.filter;

import java.io.File;
import java.util.List;

import com.ddw.meedeeuh.shared.io.SourceFile;
import com.ddw.meedeeuh.shared.io.SourceFolder;

public abstract class MovieFilterResultFactory {

	public static MovieFilterResult create(SourceFolder movieFolder, List<File> movieFolderDirectories,
			List<File> movieFolderFiles, List<SourceFile> movieFiles, boolean acceptible) {
		return new MovieFilterResultImpl(movieFolder, movieFolderDirectories, movieFolderFiles, movieFiles, acceptible);
	}

	private static class MovieFilterResultImpl implements MovieFilterResult {

		private final SourceFolder movieFolder;
		private final List<SourceFile> movieFiles;
		private final List<File> movieFolderDirectories;
		private final List<File> movieFolderFiles;
		private final boolean acceptible;

		public MovieFilterResultImpl(SourceFolder movieFolder, List<File> movieFolderDirectories,
				List<File> movieFolderFiles, List<SourceFile> movieFiles, boolean acceptible) {
			this.movieFiles = movieFiles;
			this.movieFolder = movieFolder;
			this.acceptible = acceptible;
			this.movieFolderFiles = movieFolderFiles;
			this.movieFolderDirectories = movieFolderDirectories;
		}

		@Override
		public SourceFolder getMovieFolder() {
			return this.movieFolder;
		}

		@Override
		public List<SourceFile> getMovieFiles() {
			return this.movieFiles;
		}

		@Override
		public boolean isAcceptible() {
			return this.acceptible;
		}

		@Override
		public List<File> getMovieFolderFiles() {
			return this.movieFolderFiles;
		}

		@Override
		public List<File> getMovieFolderDirectories() {
			return this.movieFolderDirectories;
		}

	}

}
